/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { TreeDataModel, TreeModel } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface BasVenCls extends TreeModel<BasVenCls> {
  clsCode?: string; // 分类编码
  clsName?: string; // 分类名称
}

export const basVenClsList = (params?: BasVenCls | any) =>
  defHttp.get<BasVenCls>({ url: adminPath + '/bas/ven/basVenCls/list', params });

export const basVenClsListData = (params?: BasVenCls | any) =>
  defHttp.post<BasVenCls[]>({ url: adminPath + '/bas/ven/basVenCls/listData', params });

export const basVenClsForm = (params?: BasVenCls | any) =>
  defHttp.get<BasVenCls>({ url: adminPath + '/bas/ven/basVenCls/form', params });

export const basVenClsCreateNextNode = (params?: BasVenCls | any) =>
  defHttp.get<BasVenCls>({ url: adminPath + '/bas/ven/basVenCls/createNextNode', params });

export const basVenClsSave = (params?: any, data?: BasVenCls | any) =>
  defHttp.postJson<BasVenCls>({ url: adminPath + '/bas/ven/basVenCls/save', params, data });

export const basVenClsDisable = (params?: BasVenCls | any) =>
  defHttp.get<BasVenCls>({ url: adminPath + '/bas/ven/basVenCls/disable', params });

export const basVenClsEnable = (params?: BasVenCls | any) =>
  defHttp.get<BasVenCls>({ url: adminPath + '/bas/ven/basVenCls/enable', params });

export const basVenClsDelete = (params?: BasVenCls | any) =>
  defHttp.get<BasVenCls>({ url: adminPath + '/bas/ven/basVenCls/delete', params });

export const basVenClsTreeData = (params?: any) =>
  defHttp.get<TreeDataModel[]>({ url: adminPath + '/bas/ven/basVenCls/treeData', params });
